Applications using FCFL have used an FC.env file to control database and logging configuration settings. Here is an example of a classic FC.env file:
;begin fc.env file... db_type=Oracle db_server=Clarify db_name=Clarify login_name=sa db_password=sa
While the Compatibility Layer can still be configured using an FC.env file like the one above, in the compatibility layer you can use all of the fcSDK application configuration settings for better control of the application and database settings. For example, the following FC.env file effectively replaces the previous example and disables performance counters.
;begin fc.env file... fchoice.dbtype=Oracle fchoice.connectionstring=Data Source=Clarify;uid=sa;pwd=sa; fchoice.perfcountersenabled=false
Previously, FCFL employed a simple logging mechanism. The fcSDK uses a much more sophisticated logging mechanism with many more features, including:
1. Copy one of the sample logging configuration files from your fcSDK installation directory to an appropriate working directory.
2. Edit the sample logging configuration file as appropriate for your needs.
For example, if you are logging to a file, you'll probably want to set the File param of the RollingFileAppender entry to tell the Log Manager the path and filename of where you want your log file to be located.
Refer to the Logging Config File Samples documentation for more details on and examples of logging configuration files.
3. If your application uses an fc.env file, add a new entry to the fc.env file:
compat_logconfigfile - The path and filename of a valid logging configuration file
Example:compat_logconfigfile=C:\fcClient\fcclient_logging.config
Note that the FCFL logging fc.env parameters are no longer used. It doesn't hurt to leave these entries in the fc.env file - they will be ignored by the fcSDK.
fc.env logging entries not used by fcSDK |
---|
log_file |
sql_log_file |
sql_logging |
log_fcapp |
log_fcsession |
log_fcgeneric |
log_fcbulk |
log_fcsqlexec |
4. If your application uses FCApplication.InitializeFull rather than an fc.env file, simply set a new property on the FCFLCompat.FCApplication object:
LoggingConfigFilePath - The path and filename of a valid logging configuration file
Example:FCApplication.LoggingConfigFilePath = "C:\fcClient\log.config" FCApplication.InitializeFull(...)
5. Restart your application.
From here on, you can make changes to the logging configuration file, and these changes will automatically be picked up by the Log Manager - there's no need to restart your app just to make a logging configuration change.
In the fcSDK Documentation: